]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Move statusmenu initialization in the constructor
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 18 Feb 2011 01:34:45 +0000 (02:34 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 21 Feb 2011 16:38:47 +0000 (17:38 +0100)
While related to the status area, the user status button is clearly
not a status icon, and it does not make too much sense in
startStatusArea(), which is about filling the status area with
icons. Also, the status icon container is added to the panel in
the constructor, in fact, the user status button is the only "toplevel"
panel element which is initialized elsewhere. Not a crucial change,
but makes for a nice read anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=642697

js/ui/panel.js

index f1a5e90975ccb8ecebaba6ae08c898d53c97a2c1..550ec2e877bb9248fd86d3d23d684167a8a2e807 100644 (file)
@@ -703,6 +703,10 @@ Panel.prototype = {
         this._rightBox.add(this._trayBox);
         this._rightBox.add(this._statusBox);
 
+        this._statusmenu = new StatusMenu.StatusMenuButton();
+        this._menus.addMenu(this._statusmenu.menu);
+        this._rightBox.add(this._statusmenu.actor);
+
         Main.statusIconDispatcher.connect('status-icon-added', Lang.bind(this, this._onTrayIconAdded));
         Main.statusIconDispatcher.connect('status-icon-removed', Lang.bind(this, this._onTrayIconRemoved));
 
@@ -762,10 +766,6 @@ Panel.prototype = {
             this._statusBox.add(indicator.actor);
             this._menus.addMenu(indicator.menu);
         }
-
-        this._statusmenu = new StatusMenu.StatusMenuButton();
-        this._menus.addMenu(this._statusmenu.menu);
-        this._rightBox.add(this._statusmenu.actor);
     },
 
     startupAnimation: function() {